Optimal. Leaf size=181 \[ -\frac {b (d \tan (e+f x))^{n+2} \, _2F_1\left (1,\frac {n+2}{2};\frac {n+4}{2};-\tan ^2(e+f x)\right )}{d^2 f (n+2) \left (a^2+b^2\right )}+\frac {a (d \tan (e+f x))^{n+1} \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};-\tan ^2(e+f x)\right )}{d f (n+1) \left (a^2+b^2\right )}+\frac {b^2 (d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;-\frac {b \tan (e+f x)}{a}\right )}{a d f (n+1) \left (a^2+b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3574, 3538, 3476, 364, 3634, 64} \[ -\frac {b (d \tan (e+f x))^{n+2} \, _2F_1\left (1,\frac {n+2}{2};\frac {n+4}{2};-\tan ^2(e+f x)\right )}{d^2 f (n+2) \left (a^2+b^2\right )}+\frac {a (d \tan (e+f x))^{n+1} \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};-\tan ^2(e+f x)\right )}{d f (n+1) \left (a^2+b^2\right )}+\frac {b^2 (d \tan (e+f x))^{n+1} \, _2F_1\left (1,n+1;n+2;-\frac {b \tan (e+f x)}{a}\right )}{a d f (n+1) \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 64
Rule 364
Rule 3476
Rule 3538
Rule 3574
Rule 3634
Rubi steps
\begin {align*} \int \frac {(d \tan (e+f x))^n}{a+b \tan (e+f x)} \, dx &=\frac {\int (d \tan (e+f x))^n (a-b \tan (e+f x)) \, dx}{a^2+b^2}+\frac {b^2 \int \frac {(d \tan (e+f x))^n \left (1+\tan ^2(e+f x)\right )}{a+b \tan (e+f x)} \, dx}{a^2+b^2}\\ &=\frac {a \int (d \tan (e+f x))^n \, dx}{a^2+b^2}-\frac {b \int (d \tan (e+f x))^{1+n} \, dx}{\left (a^2+b^2\right ) d}+\frac {b^2 \operatorname {Subst}\left (\int \frac {(d x)^n}{a+b x} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=\frac {b^2 \, _2F_1\left (1,1+n;2+n;-\frac {b \tan (e+f x)}{a}\right ) (d \tan (e+f x))^{1+n}}{a \left (a^2+b^2\right ) d f (1+n)}-\frac {b \operatorname {Subst}\left (\int \frac {x^{1+n}}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{\left (a^2+b^2\right ) f}+\frac {(a d) \operatorname {Subst}\left (\int \frac {x^n}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=\frac {a \, _2F_1\left (1,\frac {1+n}{2};\frac {3+n}{2};-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{1+n}}{\left (a^2+b^2\right ) d f (1+n)}+\frac {b^2 \, _2F_1\left (1,1+n;2+n;-\frac {b \tan (e+f x)}{a}\right ) (d \tan (e+f x))^{1+n}}{a \left (a^2+b^2\right ) d f (1+n)}-\frac {b \, _2F_1\left (1,\frac {2+n}{2};\frac {4+n}{2};-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{2+n}}{\left (a^2+b^2\right ) d^2 f (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.49, size = 142, normalized size = 0.78 \[ \frac {\tan (e+f x) (d \tan (e+f x))^n \left (a^2 (n+2) \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};-\tan ^2(e+f x)\right )+b \left (b (n+2) \, _2F_1\left (1,n+1;n+2;-\frac {b \tan (e+f x)}{a}\right )-a (n+1) \tan (e+f x) \, _2F_1\left (1,\frac {n+2}{2};\frac {n+4}{2};-\tan ^2(e+f x)\right )\right )\right )}{a f (n+1) (n+2) \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.79, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (d \tan \left (f x + e\right )\right )^{n}}{b \tan \left (f x + e\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan \left (f x + e\right )\right )^{n}}{b \tan \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.30, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan \left (f x +e \right )\right )^{n}}{a +b \tan \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan \left (f x + e\right )\right )^{n}}{b \tan \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan {\left (e + f x \right )}\right )^{n}}{a + b \tan {\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________